import type {ResponseInter} from "@/api/commonInterFace.ts";

export interface loginDataInter {
    username: string,
    password: string
}

export interface loginResponseInter extends ResponseInter{
    data: string
}

// 返回的用户信息类型
export interface userInfoResponseInter extends ResponseInter{
    data: {
        routes: string[],
        buttons: string[],
        roles: string[],
        avatar: string,
        name: string
    }
}

export type logoutInter = ResponseInter

//权限类型
export interface roleInter {
    id?: number,
    createTime?: string,
    updateTime?: string,
    roleName: string,
    remark: null
}
// 获取所有角色
export interface allRoleResponseInter extends ResponseInter {
    data: {
        assignRoles: roleInter[],
        allRolesList: roleInter[]
    }
}

// 设置角色类型
export interface setRoleInter {
    roleIdList: number[],
    userId: number
}
